/*
	File: IPlan.h
	Desc: An interface for the Plan class
	Info: Create by Stanly at 2019.7.18
*/

#pragma once

#include <iostream>
#include <string>

#include "ITimeLine.h"

class IPlan
{
public:
    IPlan() {}
	virtual ~IPlan() {}

public:
	// Attributes
	virtual void        setName(std::string name)             = 0;
	virtual void        setLabel(std::string label)           = 0;
    virtual void        addLabel(std::string label)           = 0;
	virtual void        setRemarks(std::string remarks)       = 0;
	virtual std::string getName() const                       = 0;
	virtual std::string getLabel() const                      = 0;
	virtual std::string getRemarks() const                    = 0;
    
    //TODO get startTime&endTime

	virtual int         add(IPlan* plan)                      = 0;
	virtual int         remove(IPlan* plan)                   = 0;
	virtual IPlan*      find(std::string name)                = 0;
	virtual IPlan*      find(int index)                       = 0;

	virtual void         setNext(IPlan* plan) = 0;
	virtual void         setPre(IPlan* plan) = 0;
	virtual const IPlan* getNext() const = 0;
	virtual const IPlan* getPre() const = 0;

	// Time line
	virtual int         addTimeLine(ITimeLine* newTimeLine)   = 0;
	virtual int         removeTimeLine(std::string name)      = 0;
	virtual ITimeLine*  getTimeLine(std::string name) const   = 0;
	virtual ITimeLine*  getTimeLine(int index) const          = 0;

	virtual bool        operator==(IPlan& p)                  = 0;
};
